package com.bing.controller;

import com.bing.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by B-29931 on 9/10/2018.
 */
@RestController
public class TestController {

    @GetMapping("/hello")
    public String hello() {
        return "hello world !";
    }

    @RequestMapping("/getUser")
    public User getUser() {
        User user = new User();
        user.setName("Jack");
        user.setAge(18);
        user.setPassword("98xxx36");
        return user;
    }
}
